package com.github.thinwonton.excel2sql;

import com.github.thinwonton.excel2sql.conf.GenerateProperties;
import com.github.thinwonton.excel2sql.sevice.ReadConfiguration;
import com.github.thinwonton.excel2sql.sevice.ReadExcel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Main {
    private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);

    public static void main(String[] args) {
        ReadConfiguration readConfiguration = new ReadConfiguration();
        GenerateProperties properties = readConfiguration.getGenerateProperties();

        ReadExcel readExcel = new ReadExcel(properties);
        if (properties.isOutputScriptFile()) {
            readExcel.outputFile();
            LOGGER.info("SQL文件写出成功");
        }
        LOGGER.info("程序结束");
    }
}
